Skip to content

Conversation

spoons-and-mirrors
Copy link
Contributor

@spoons-and-mirrors spoons-and-mirrors commented Aug 18, 2025

Summary

Changing edit tool error message in case of match from:

  • oldString not found in content or was found multiple times

to

  • oldString not found in content
  • oldString found multiple times and requires more code context to uniquely identify the intended match

Should drastically improve edit error handling by the LLM which tend to tunnel vision on the first part of the error (the "not found" part), when the LLM knows it's there, and thus behave like it's a tool error and thinks retrying will make it work.

See it in action

image

@adamdotdevin adamdotdevin requested a review from thdxr August 19, 2025 10:32
@thdxr thdxr merged commit 900fe5c into sst:dev Sep 5, 2025
1 check passed
@spoons-and-mirrors spoons-and-mirrors deleted the tool/edit-error-change branch September 5, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants